﻿using System;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using System.ComponentModel;
using DevExpress.ExpressApp.DC;
using DevExpress.Data.Filtering;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;

namespace aztall.Module.BusinessObjects
{
	public class PriceListSku : RootObject
	{
		public PriceListSku(Session session)
				: base(session)
		{
		}
		public override void AfterConstruction()
		{
			base.AfterConstruction();
		}
		protected PriceList _PriceList;
		[Association("PriceList_PriceListSku", UseAssociationNameAsIntermediateTableName = true)]
		public PriceList PriceList
		{
			get { return _PriceList; }
			set { SetPropertyValue(nameof(PriceList), ref _PriceList, value); }
		}
		protected Sku _Sku;
		[DataSourceCriteria("Domain.Oid = '@This.PriceList.Domain.Oid' and Status.Category = '" + Status.Sku + "' and Status.StatusCode = 'Active'")]
		public Sku Sku
		{
			get { return _Sku; }
			set { SetPropertyValue(nameof(Sku), ref _Sku, value); }
		}
		protected double _UnitPrice;
		public double UnitPrice
		{
			get { return _UnitPrice; }
			set { SetPropertyValue(nameof(UnitPrice), ref _UnitPrice, value); }
		}

	}
}
